//Copyright 2010 Balazs Keri, Imre Keri
//
//This file is part of FireworksCreator.
//
//FireworksCreator is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//FireworksCreator is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with FireworksCreator.  If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _MODELDATAREFERENCECOLLECTORS_H
#define _MODELDATAREFERENCECOLLECTORS_H
//
#include <global.h>
#include <common/id.h>
#include <model/root_fwd.h>
#include <model/particletemplate_fwd.h>
#include <model/emittertemplate_fwd.h>
//
namespace ParticleTemplateReferenceCollector
{
struct AtEmitter
{
   Id emitter_id;
   int emitter_block_index;
   AtEmitter(Id id,int ix):emitter_id(id),emitter_block_index(ix){;}
};
typedef QList<AtEmitter> AtEmitterList;
typedef QList<Id> AtShooterList;
AtEmitterList collect_at_emitters(const model::ParticleTemplate &p_pt,const model::Root &p_root);
AtShooterList collect_at_shooters(const model::ParticleTemplate &p_pt,const model::Root &p_root);
}
//
namespace EmitterTemplateReferenceCollector
{
struct AtParticle
{
   Id particle_id;
   int emitter_block_index;
   AtParticle(Id id,int ix):particle_id(id),emitter_block_index(ix){;}
};
struct AtEmitter
{
   Id emitter_id;
   int emitter_block_index;
   AtEmitter(Id id,int ix):emitter_id(id),emitter_block_index(ix){;}
};
typedef QList<AtParticle> AtParticleList;
typedef QList<AtEmitter> AtEmitterList;
typedef QList<Id> AtShooterList;
AtParticleList collect_at_particles(const model::EmitterTemplate &p_et,const model::Root &p_root);
AtEmitterList collect_at_emitters(const model::EmitterTemplate &p_et,const model::Root &p_root);
AtShooterList collect_at_shooters(const model::EmitterTemplate &p_et,const model::Root &p_root);
}
//
#endif
